package view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

import controller.viewController.trainingController;

public class DeleteTraining {

	private JFrame frame;
	private JTextField textFieldTrainingID;
	private JTextField textFieldCompanyName;
	private JTextField textFieldProduct;
	private JTextField textFieldStart;
	private JTextField textFieldDestination;
	private JTextField textFieldDays;
	private JTextField textFieldTrainer;
	private JTextField textFieldPlace;
	private JTextField textFieldComments;

	private trainingController tc;
	
	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		EventQueue.invokeLater(new Runnable() {
//			public void run() {
//				try {
//					DeleteTraining window = new DeleteTraining();
//					window.frame.setVisible(true);
//				} catch (Exception e) {
//					e.printStackTrace();
//				}
//			}
//		});
//	}

	/**
	 * Create the application.
	 */
	public DeleteTraining() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setResizable(false);
		frame.setBounds(100, 100, 730, 475);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JLabel lblTrainingID = new JLabel("TrainingID:");
		lblTrainingID.setBounds(20, 11, 83, 14);
		frame.getContentPane().add(lblTrainingID);
		
		textFieldTrainingID = new JTextField();
		textFieldTrainingID.setBounds(117, 8, 70, 20);
		frame.getContentPane().add(textFieldTrainingID);
		textFieldTrainingID.setColumns(10);
		
		JLabel lblCompanyName = new JLabel("Firmenname:");
		lblCompanyName.setBounds(20, 42, 83, 14);
		frame.getContentPane().add(lblCompanyName);
		
		textFieldCompanyName = new JTextField();
		textFieldCompanyName.setBounds(117, 39, 280, 20);
		frame.getContentPane().add(textFieldCompanyName);
		textFieldCompanyName.setColumns(10);
		
		JLabel lblProduct = new JLabel("Produkt:");
		lblProduct.setBounds(20, 73, 83, 14);
		frame.getContentPane().add(lblProduct);
		
		textFieldProduct = new JTextField();
		textFieldProduct.setBounds(117, 70, 280, 20);
		frame.getContentPane().add(textFieldProduct);
		textFieldProduct.setColumns(10);
		
		JLabel lblStart = new JLabel("Anfangsdatum:");
		lblStart.setBounds(20, 104, 83, 14);
		frame.getContentPane().add(lblStart);
		
		textFieldStart = new JTextField();
		textFieldStart.setBounds(117, 101, 86, 20);
		frame.getContentPane().add(textFieldStart);
		textFieldStart.setColumns(10);
		
		JLabel lblDestination = new JLabel("Enddatum:");
		lblDestination.setBounds(20, 135, 83, 14);
		frame.getContentPane().add(lblDestination);
		
		textFieldDestination = new JTextField();
		textFieldDestination.setBounds(117, 132, 86, 20);
		frame.getContentPane().add(textFieldDestination);
		textFieldDestination.setColumns(10);
		
		JLabel lblDays = new JLabel("Tage:");
		lblDays.setBounds(20, 166, 86, 14);
		frame.getContentPane().add(lblDays);
		
		textFieldDays = new JTextField();
		textFieldDays.setBounds(117, 163, 44, 20);
		frame.getContentPane().add(textFieldDays);
		textFieldDays.setColumns(10);
		
		JLabel lblTrainer = new JLabel("Trainer:");
		lblTrainer.setBounds(20, 197, 83, 14);
		frame.getContentPane().add(lblTrainer);
		
		textFieldTrainer = new JTextField();
		textFieldTrainer.setBounds(117, 194, 280, 20);
		frame.getContentPane().add(textFieldTrainer);
		textFieldTrainer.setColumns(10);
		
		JLabel lblPlace = new JLabel("Ort:");
		lblPlace.setBounds(20, 228, 83, 14);
		frame.getContentPane().add(lblPlace);
		
		textFieldPlace = new JTextField();
		textFieldPlace.setBounds(117, 225, 280, 20);
		frame.getContentPane().add(textFieldPlace);
		textFieldPlace.setColumns(10);
		
		JLabel lblComments = new JLabel("Bemerkungen:");
		lblComments.setBounds(20, 259, 83, 14);
		frame.getContentPane().add(lblComments);
		
		textFieldComments = new JTextField();
		textFieldComments.setBounds(117, 256, 575, 20);
		frame.getContentPane().add(textFieldComments);
		textFieldComments.setColumns(10);
		
		JButton btnSearchTraining = new JButton("Training suchen");
		btnSearchTraining.setBounds(20, 341, 150, 23);
		frame.getContentPane().add(btnSearchTraining);
		btnSearchTraining.addActionListener(action_btnSearchTraining);
		
		JButton btnDeleteTraining = new JButton("Training suchen");
		btnDeleteTraining.setBounds(180, 341, 150, 23);
		frame.getContentPane().add(btnDeleteTraining);
		btnDeleteTraining.addActionListener(action_btnDeleteTraining);
		
		JButton btnBack = new JButton("Zur\u00FCck");
		btnBack.setBounds(340, 341, 150, 23);
		frame.getContentPane().add(btnBack);
		
		JLabel lblBotlane = new JLabel("PlEnTra /Training l\u00F6schen");
		lblBotlane.setBounds(20, 422, 694, 14);
		frame.getContentPane().add(lblBotlane);
		btnBack.addActionListener(action_btnBack);

		frame.setVisible(true);
	
	}
	
	public ActionListener action_btnSearchTraining = new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
			
		}
	};
	
	public ActionListener action_btnDeleteTraining = new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
			
		}
	};

	public ActionListener action_btnBack = new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
			
			frame.setVisible(false);
			
		}
	};
}
